/*
   Class: Thunderbird
   Thunderbird object representation
 */

function Thunderbird()
{
    var mainWindow;
    var composeWindow;

    Thunderbird.prototype.getMainWindow = function ()
    {
        this.mainWindow = new ThunderbirdMainWindow();
        return this.mainWindow;
    }

    Thunderbird.prototype.getComposeWindow = function ()
    {
        composeWindow = new ThunderbirdComposeWindow();
        return this.composeWindow;
    }
}

function ThunderbirdMainWindow()
{
    var statusbar = document.getElementById("vanish-main-statusbar");
    var currentReadMessage = document.getElementById("messagepane").contentDocument.body;

    ThunderbirdMainWindow.prototype.getStatusBar = function ()
    {
        var value = statusbar.getAttribute("label");
        return value;
    }

    ThunderbirdMainWindow.prototype.setStatusBar = function (stringVal)
    {
        statusbar.setAttribute("label", stringVal);
    }

    ThunderbirdMainWindow.prototype.getCurrentReadMessage = function ()
    {
        return currentReadMessage.textContent;
    }
}

function ThunderbirdComposeWindow()
{
    var statusbar = document.getElementById("vanish-msgcompose-statusbar");
    var message = document.getElementById("content-frame").contentDocument.body;

    ThunderbirdComposeWindow.prototype.getStatusBar = function ()
    {
        var value = statusbar.getAttribute("label");
        return value;
    }

    ThunderbirdComposeWindow.prototype.setStatusBar = function (stringVal)
    {
        statusbar.setAttribute("label", stringVal);
    }

    ThunderbirdComposeWindow.prototype.getMessage = function ()
    {
        return message.textContent;
    }

    ThunderbirdComposeWindow.prototype.setMessage = function (stringVal)
    {
        message.textContent = stringVal;
    }

}